import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login'
import home from '@/views/home'
import Welcome from '@/views/welcome/Welcome'

Vue.use(Router)

export default new Router({
  routes: [
    {
      // path: '/',
      // name: 'HelloWorld',
      // component: HelloWorld
      path:'/login',
      name:'login',
      component: login
    },
    {
      path: '/',
      name: 'home',
      component: home,
      redirect: {
        path: 'welcome'  //路由重定向,把'/'home页面路径变成welcome页面
      },
      children: [{
        name: 'Welcome',
        path: 'welcome',
        component: Welcome
      }]
    }
  ]
})
